package com.bpzj.web.spring.returnformat;

import java.time.LocalDateTime;
import java.util.Date;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DateTileFormat {

  @GetMapping("/datetime")
  @CrossOrigin(origins = "*")
  public LocalDateTime get() {
    return LocalDateTime.now();
  }
  @GetMapping("/date")
  public Date getDate() {
    return new Date();
  }
}
